package cn.kgc.ffzw.day18.homework;

import java.util.Scanner;

public class User extends Menu {
    Scanner s=new Scanner(System.in);
    private String[] list={"我要订餐","查看餐袋","签收订单","删除订单","我要点赞","输入0退出"};


    public User(OrderList orderList) {
        super(orderList);
    }

    public void Menulist() {
        for (int i = 0; i < list.length; i++) {
            System.out.println((i+1)+". "+list[i]);
        }
        System.out.println("请选择：");
        setChoice(s.nextInt());
    }



    @Override
    public void showmenu() {
        this.Menulist();
        do {
            switch (getChoice()){
                case 1:
                    this.order();
                    break;
                case 2:
                    this.check();
                    break;
                case 3:
                    this.signorder();
                    break;
                case 4:
                    this.deletorder();
                    break;
                case 5:
                    this.like();
                    break;
                case 6:
                    break;
                default:
                    return;
            }
            this.Menulist();
        }while (getChoice()<6);
    }


    @Override
    public void check() {
        super.check();
    }

    @Override
    public void order() {
        super.order();
    }

    @Override
    public void deletorder() {
        super.deletorder();
    }

    @Override
    public void signorder() {
        super.signorder();
    }

    @Override
    public void like() {
        super.like();
    }
}
